package junit;

import org.junit.Assert;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class CalculatorTest {
    //创建Calculator对象
    Calculator calculator = new Calculator();
    @BeforeEach
    void setUp() {
    }

    @Test
    void add() {
        calculator.add(10);
        int result = calculator.getResult();
        Assert.assertEquals(10,result);
    }

    @Test
    void substract() {
    }

    @Test
    void multiply() {
    }

    @Test
    void divide() {
    }

    @Test
    void square() {
    }

    @Test
    void squareRoot() {
    }
}